
using System.IO;
using System.Windows.Forms;
using Scintilla.Configuration;
using Scintilla.Configuration.SciTE;

namespace UmbracoXsltEditor.Util
{
    public static class ScintillaHelper
    {
        public static ScintillaConfig CreateScintillaConfig()
        {
            ScintillaConfig config = null;
            FileInfo exeFile = new FileInfo(Application.ExecutablePath);
            FileInfo globalConfigFile = new FileInfo(exeFile.Directory.FullName + @"\Configuration\global.properties");
            if (globalConfigFile.Exists)
            {
                SciTEProperties props = new SciTEProperties();
                props.Load(globalConfigFile);
                config = new ScintillaConfig(props);
            }

            return config;
        }
    }
}
